﻿using ExpenseSystem.Common;
using ExpenseSystem.Core.DataAddOn;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Model;
using System.Web;

namespace ExpenseSystem.Core.BankModules
{
    public abstract class BankManager : INormalManager<BankModel>
    {
        protected string tran = HttpContext.Current.Items[Definition.SESSION_TRAN_STR].ToString();

        protected BankManager()
        {
            profile = Authority.Authority.GetUserProfile();
        }

        protected UserProfile profile;
        public static BankManager CreateInstance()
        {
            return new BankBaseManager();
        }
        protected NormalDataUpdater<BankModel> bankUpdater = new BankUpdaterRegister().GetBankUpdater();

        public abstract bool Delete(BankModel Customer, out string message);
        public abstract bool DeleteById(long[] CustomerId, out string message);
        public abstract bool Save(BankModel Customer, out string message, params IAddable<BankModel>[] addables);
    }
}
